//package com.zscat.mall.portal.controller;
//
//
//import com.zscat.common.result.CommonResult;
//import com.zscat.mall.portal.entity.MemberBrandAttention;
//import com.zscat.mall.portal.service.MemberAttentionService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import java.util.List;
//
///**
// * 会员关注品牌管理Controller
// * Created by zscat on 2018/8/2.
// */
//@Controller
//@Api(tags = "MemberAttentionController", description = "会员关注品牌管理")
//@RequestMapping("/api/member/attention")
//public class MemberAttentionController {
//    @Resource
//    private MemberAttentionService memberAttentionService;
//
//    @ApiOperation("添加品牌关注")
//    @RequestMapping(value = "/add", method = RequestMethod.POST)
//    @ResponseBody
//    public Object add(@RequestBody MemberBrandAttention memberBrandAttention) {
//        int count = memberAttentionService.add(memberBrandAttention);
//        if (count > 0) {
//            return new CommonResult().success(count);
//        } else {
//            return new CommonResult().failed();
//        }
//    }
//
//    @ApiOperation("取消关注")
//    @RequestMapping(value = "/delete", method = RequestMethod.POST)
//    @ResponseBody
//    public Object delete(Long memberId, Long brandId) {
//        int count = memberAttentionService.delete(memberId, brandId);
//        if (count > 0) {
//            return new CommonResult().success(count);
//        } else {
//            return new CommonResult().failed();
//        }
//    }
//
//    @ApiOperation("显示关注列表")
//    @RequestMapping(value = "/list/{memberId}", method = RequestMethod.GET)
//    @ResponseBody
//    public Object list(@PathVariable Long memberId) {
//        List<MemberBrandAttention> memberBrandAttentionList = memberAttentionService.list(memberId);
//        return new CommonResult().success(memberBrandAttentionList);
//    }
//}
